/** @format */

import axios from '@/utils/request';

// 接口列表查询
export function getList(params) {
  return axios.get('/rfid/interfaces/list', { params: params })
}

// 版本号下拉
export function dropDownVersion(params) {
  return axios.get('/rfid/interfaces/dropDownVersion', { params: params })
}

// 通过ID查询详情
export function getInfo(interfaceId) {
  return axios.get('/rfid/interfaces/queryOne', { params: {interfaceId: interfaceId} });
}

// 编辑接口
export function update(data) {
  return axios.put('/rfid/interfaces/edit', data);
}

// 复制接口
export function copy(data) {
  return axios.post('/rfid/interfaces/copy', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  });
}

// 通过ID查询参数详情
export function queryParamById(paramId) {
  return axios.get('/rfid/interfaces/queryParamById', { params: {paramId: paramId} });
}
